<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
</head>
<body>
<center>
    <button onclick="alert('点我干嘛')">点击试一试</button>
    <br>
    <div id="btn">
        <!--点击事件，可以简写为@click。-->
        <button v-on:click="fun1(msg)">Vue语法的点击事件</button>
        <hr>
        <button @click="fun1(msg)">Vue语法的点击事件</button>
    </div>

</center>
</body>

<script type="text/javascript">
    // 实例化vue对象
    let vm = new Vue({
        el: "#btn",
        data: { // 负责数据渲染
            msg: "vue当中的v-on:click"
        },
        methods: { // 负责方法调用
            fun1: function (param) {
                alert(param);
            }
        }
    });

</script>
</html>